package com.chen.controller;

import com.chen.pojo.Dept;
import com.chen.service.IDeptService;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;

import javax.annotation.Resource;

/**
 * <p>
 * 部门表 前端控制器
 * </p>
 *
 * @author chen
 * @since 2024-04-10
 */
@Controller("/dept")
@RequestMapping("/dept")
public class DeptController {
    @Resource
    public IDeptService deptService;
    @GetMapping("/test/{id}")
    public Dept test(@PathVariable("id")Long id){
        Dept dept = deptService.getById(id);
        System.out.println(dept);
        return dept;
    }

}
